when action = '=9' then do; log.returnRetry = 0; log.returnStatus = 'Sent+'; call updateLogEntry(mailbox, magicCookie); call aamaintenancemode(log.origmailbox); signal answerVoiceDone; end
when action = '=#' then signal answerVoiceDone
when action = '=*' then signal sendVoiceOK
when action = 4 then do; log.returnStatus = 'Fax?'; log.returnRetry = 0; signal sendVoiceDone; end
when action = 5 then do; log.returnStatus = 'Data?'; log.returnRetry = 0; signal sendVoiceDone; end
when action = 8 then do; if numTimes = 3 then signal sendVoiceAgain; else signal sendVoiceBusy; end
when action = 10 then nop
when action = 12 then do; log.returnStatus = 'Abort'; log.returnRetry = 0; signal sendVoiceDone; end
when action = 14 then do; log.returnStatus = 'Error'; log.returnRetry = 0; signal sendVoiceDone; end
when action = 16 then do; log.returnStatus = 'Error'; log.returnRetry = 0; signal sendVoiceDone; end
when action = '=1' then signal retrievemessagesagain
when action = '=2' then do; call playtimedate(); end
when action = '=3' then do; call playtelcidnumber(); end
when action = '=4' then signal processNextMessage
when action = '=5' then do; address rexx 'delete' mailbox currentHandle; signal processNextMessage; end
when action = '=6' then do; if isOutgoing = 0 then address rexx 'archive' mailbox currentHandle; else address rexx 'archiveoutgoing' mailbox currentHandle; signal processNextMessage; end
when action = '=7' then do; call forwardmessage(mailbox, currentHandle); end
when action = '=8' then do; call replymessage(mailbox, currentHandle); end
when action = '=9' then nop
when action = '=#' then do; return; end
when action = '=*' then signal answervoiceDone
when action = 4 then signal stdfax
when action = 5 then signal stddata
when action = 8 then signal stdbusy
when action = 10 then signal answerVoiceDone
when action = 12 then signal stdabort
when action = 14 then signal stderror
when action = 16 then signal stderror
otherwise signal arexxerror
end
signal aftertype
processNextMessage:
currentLog = currentLog + 1
signal retrievemessagesnext
playtimedate:
actualTime = convertToTime(log.time)
actualDate = convertToDate(log.time)
call playTime(actualTime)
actualDate = date('s', actualDate) /* convert to sorted */